package com.lovemio.springcloud.config;

import com.alibaba.csp.sentinel.adapter.servlet.callback.WebCallbackManager;
import com.lovemio.springcloud.exception.ExceptionHandler;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author liwenjin
 * @date 2021年04月09日 13:55
 */
@Configuration
public class SentinelConfiguration {
    @PostConstruct
    public void init(){
        WebCallbackManager.setUrlBlockHandler(new ExceptionHandler());
    }
}
